package com.zhentao.files;

import com.baomidou.mybatisplus.annotation.*;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Transient;

/**
 *
 * @TableName tb_files
 */
@TableName(value ="tb_files")
@Data
public class TbFiles implements Serializable {
    /**
     * 档案id
     */
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 档案标题
     */
    private String title;

    /**
     * 发布日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(name = "publish_date")
    private Date publishDate;

    /**
     * 0：待审核 1：上架 2：下架 3：草稿 4：审核失败  5：敏感词通过
     */
    private Integer status;

    /**
     * 用户id
     */
    @Column(name = "u_id")
    private Integer uId;

    /**
     * 仓库id
     */
    @Column(name = "w_id")
    private Integer wId;

    /**
     * 0 删除  1 开启
     */
    private String enable;

    /**
     * 创建人
     */
    @TableField(fill = FieldFill.INSERT)
    @Column(name = "create_by")
    private String createBy;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @Column(name = "create_time")
    private Date createTime;

    /**
     * 修改人
     */
    @TableField(fill = FieldFill.UPDATE)
    @Column(name = "update_by")
    private String updateBy;

    /**
     * 修改时间
     */
    @TableField(fill = FieldFill.UPDATE)
    @Column(name = "update_time")
    private Date updateTime;

    /**
     * 备注
     */
    private String remark;

    /**
     * 类型id
     */
    @TableField(exist = false)
    @Transient
    private Integer typeId;

    @TableField(exist = false)
    @Transient
    private static final long serialVersionUID = 1L;
}
